<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>vueDemo1</title>
    <style type="text/css">
        /**{margin: 20px;padding: 20px;}*/
    </style>
</head>
<body>
    <div id="app">
        <span v-for="(e,i) in fruits">
            {{e.name}}--原价--{{e.price}}&nbsp;&nbsp;&nbsp;&nbsp;
            {{e.name}}--打5折--{{e.price|zhe(5)}}<br/><br/><br/><br/>
        </span>
    </div>
<script src="js/vue.min.js"></script>
<script src="js/jquery-1.12.4.js"></script>
<script>
    var app = new Vue({
        el:"#app",
        data:{
            fruits:[{"name":"三星","price":"4500"},
                {"name":"华为","price":"6500"},
                {"name":"苹果","price":"8500"},
                {"name":"Vivo","price":"3850"}]
        },
        filters:{
            zhe:function(e,arg){
                return e*arg/10
            }
        }
    })
</script>
</body>
</html>